export const http = function({method,url,data,headers,success}){
  wx.showLoading({
    title: '加载中..',
  })
  wx.request({
    method,
    url,
    data,
    headers,
    success:(res)=>{
      console.log(res);
      wx.hideLoading();
      wx.showToast({
        title: res.data.msg,
      })
      success(res);
    },
    fail:(err)=>{

    }
  })
}